<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/5
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="mybatis.pojo.Grade" %>
<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.GradeServerices" %>
<%@ page import="mybatis.services.SubjectServerices" %>
<%@ page import="java.util.List" %>
<%@ page import="mybatis.services.StudentService" %>
<%@ page import="mybatis.pojo.Student" %>
<script src="js/jquery.js"></script>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    Long id =Long.parseLong( request.getParameter("stId"));
    out.print(id);
    Student student = StudentService.ME.find(id);

%>

<%
    List<Grade> all = GradeServerices.ME.findAll();
%>
<!--主体内容-->
<%@include file="checkLogin.jsp"%>
<section class="publicMian ">
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>课程管理页面 >> 课程修改页</span>
        </div>
        <div class="providerAdd">
            <form action="doUpdateStu.jsp" method="post">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="providerId">id：</label>
                    <input type="number"  name="id"  VALUE="<%=student.getStuno()%>" readonly/>
                    <span>*</span>
                </div>
                <div >
                    <label for="providerId">姓名：</label>
                    <input type="text"  name="sname" id="providerId" value="<%=student.getSname()%>"/>
                    <span>*</span>
                </div>
                <div>
                    <label >性别：</label>

                    <input type="radio" name="gender" <%if(student.getSex().equals("男"))
                        out.print("checked");%> value="男"/>男
                    <input type="radio" name="gender" <%if(student.getSex().equals("女"))
                        out.print("checked");%> value="女" />女
                    <input type="radio" name="gender" <%if(student.getSex().equals("妖"))
                        out.print("checked");%> value="妖"/>妖
                    <input type="radio" name="gender" <%if(student.getSex().equals("人妖"))
                        out.print("checked");%> value="人妖"/>人妖
                    <%--<input type="radio" name="gender" value="男"/>男--%>
                    <%--<input type="radio" name="gender" value="女" />女--%>
                    <%--<input type="radio" name="gender" value="妖"/>妖--%>
                    <%--<input type="radio" name="gender" value="人妖"/>人妖--%>

                    <span >*</span>
                </div>
                <div>
                    <label for="providerName2">电话：</label>
                    <input type="number" name="tel" id="providerName2" value="<%=student.getTelephone()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName3">qq：</label>
                    <input type="number" name="qq" id="providerName3" value="<%=student.getQq()%>"/>
                    <span >*</span>
                </div>

                <div>
                    <label for="providerName5">微信：</label>
                    <input type="number" name="wechat" id="providerName5" value="<%=student.getWechat()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label>请选择年级信息：</label>
                    <select name="gradeId" id="gradeId">
                        <%
                            for (Grade grade : all) {
                        %>
                        <option value="<%=grade.getId()%>"><%=grade.getGname()%></option>
                        <% } %>
                    </select>
                    <span></span>

                </div>
                <div>
                    <label for="providerName6">入学时间：</label>
                    <input type="date" name="enterDate" id="providerName6" value="<%=student.getEnterdate()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName7">来自城市：</label>
                    <input type="text" name="city" id="providerName7" value="<%=student.getFromcity()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName8">出生日期：</label>
                    <input type="date" name="birth" id="providerName8" value="<%=student.getBirthday()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName9">地址：</label>
                    <input type="text" name="address" id="providerName9" value="<%=student.getAddress()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName10">密码：</label>
                    <input type="password" name="psd" id="providerName10" value="<%=student.getPass()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName11">身份证：</label>
                    <input type="number" name="idCard" id="providerName11" value="<%=student.getIdcardpic()%>"/>
                    <span >*</span>
                </div>
                <div>
                    <span>*</span>
                </div>
                <div>
                    <span>*</span>

                </div>
                <div>
                    <span>*</span>

                </div>
                <div>
                    <span>*</span>

                </div>
                <div class="providerAddBtn">
                    <!--<a href="#">保存</a>-->
                    <!--<a href="providerList.html">返回</a>-->
                    <input type="submit" value="保存"/>
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
<script>
    $(function () {
        $("#gradeId").val(<%=student.getGradeid()%>);
    })
</script>
<footer class="footer">
</footer>



</body>
</html>